﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Yuekao.Domain.Entitys
{
    public class WorkflowDefinitionModel
    {
        [Key]
        public long Id { get; set; }
        /// <summary>
        /// 流程标识符
        /// </summary>
        public string DefinitionId {  get; set; }
        /// <summary>
        /// 流程版本号
        /// </summary>
        public int Version {  get; set; }
        /// <summary>
        /// 流程设计标题
        /// </summary>
        public string Title {  get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateName {  get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime {  get; set; }
        /// <summary>
        /// 流程设计步骤
        /// </summary>
        [Column(TypeName ="json"),Required]
        public string Steps {  get; set; }
        /// <summary>
        /// 流程设计表单
        /// </summary>
        [Column(TypeName = "json")]
        public string? FormData { get; set; }
    }
    public class StepNode
    { 
        /// <summary>
        /// 步骤id
        /// </summary>
        public string StepId {  get; set; }
        /// <summary>
        /// 步骤名称
        /// </summary>
        public string StepName { get; set; }
        /// <summary>
        /// 审批人id
        /// </summary>
        public long AuditId { get; set; }
        /// <summary>
        /// 审批人名称
        /// </summary>
        public string AuditName { get; set; }
        /// <summary>
        /// 下一步骤id
        /// </summary>
        public string NextStep {  get; set; }
    }
    public class FormData
    {
        /// <summary>
        /// 字段名称
        /// </summary>
        public string FormDataName {  get; set; }
        /// <summary>
        /// 字段默认值
        /// </summary>
        public string FormDataDefault { get; set; }
        /// <summary>
        /// 字段类型
        /// </summary>
        public int FormDataType { get; set; }
    }
}
